from django.db import models
# Create your models here.


class Teacher(models.Model):
    tname = models.CharField("老师名字",max_length=20)

    class Mtea:
        db_table = "teacher"

class Stutend(models.Model):
    sname = models.CharField("学生名字",max_length=20)
    tid = models.ForeignKey(Teacher,on_delete=models.CASCADE)
    img = models.CharField("学生图片",max_length=120)

    class Meta:
        db_table = "stutend"

